﻿package app.demo.pong{	import flash.display.Sprite;	import flash.text.TextField;	import flash.text.TextFormat;	import flash.text.TextFieldAutoSize;	public class GameOver extends Sprite	{		private var bg:Sprite;		private var gameOver:TextField;		private var format:TextFormat;		function GameOver()		{				bg = new Sprite();			bg.graphics.beginFill(0xFFFFFF,0.90);			bg.graphics.drawRoundRect(-20,-20,425, 210,10);			addChild(bg);						gameOver = new TextField();			gameOver.autoSize = TextFieldAutoSize.LEFT;			addChild(gameOver);						format = new TextFormat("_sans",72,0x000000,false,false,false,false,null,"center");			format.align = "center";		}				function setMessage(msg:String):void		{					gameOver.text = "Game Over\n" + msg;			gameOver.setTextFormat(format);				}	}}